home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
GARBLE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-03
|
3KB
|
109 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: garble.c
// Title: Application Template
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains the program entry point for
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
#include <base.h>
//----------------------------------------------------------------------------
// Stack size
//----------------------------------------------------------------------------
#if COMPILER_BORLAND && (OS_DOS || OS_WINDOWS)
unsigned _stklen = 0x4000;
#endif
//----------------------------------------------------------------------------
// Globals
//----------------------------------------------------------------------------
//
// A useless string which is simply embedded in the executable.
//
PSZ __pszCredits__ = "Written by John M Weeder, 1993";
//
// This should contain a program description which will be displayed as
// part of the program's help text.
//
static PCSZ pcszDescription =
"This program garbles a file using a specific text string.\n"
"The garble operation is transitive and commutative.";
//
// Program command line options
//
static CHAR szGarble[81];
static CHAR szFile[81];
static BS_CMDOPT acmdopt[] =
{
{ "filename", (PVOID)szFile, CMDOPT_FILESPECR(80), "File name specification." },
{ "garble", (PVOID)szGarble, CMDOPT_FILESPECR(80), "String to garble file with." },
BS_CMDOPT_NULL,
};
//----------------------------------------------------------------------------
// Description: main() - Program entry point
// Parameters: Standard C parameters
// Returns: DOS return code.
//----------------------------------------------------------------------------
int main(int argc, char **argv)
{
static BS_CFG cfg = CFG_DFT;
//
// Initialize base library
//
BaseLibraryInitialize(argc, argv, &cfg);
BaseTitle("$Revision: 93.1 $", __DATE__, __TIME__, "Garble File");
if (!BaseTitleHelp(acmdopt, pcszDescription,NULL))
return 99;
if (!GarbleFile(szFile, szGarble))
{
Output("Failed.\n");
return 99;
}
return 0;
}
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------